﻿using System.Collections;
using System.Collections.Generic;
using Unity.Entities;
using Unity.Mathematics;
using UnityEngine;


public struct VelComp : IComponentData
{
    public float2 value;
}

/// <summary>
/// ͨAuthoring
/// </summary>
public class VelCompAuthoring : MonoBehaviour
{
    public float2 value;

    public class Baker : Baker<VelCompAuthoring>
    {
        public override void Bake(VelCompAuthoring authoring)
        {
            var entity = GetEntity(TransformUsageFlags.Dynamic);
            AddComponent(entity, new VelComp {
                value = authoring.value
            });
        }
    }
}